package com.example.demo.model;

import java.io.Serializable;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.demo.utils.JwtHelper;
public class ResponseModal extends Modal implements Serializable {

	private static final long serialVersionUID = 1L;

	private Object data;


	private long total;
	private String token;
	
	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public ResponseModal() {
		super();
		this.token=JwtHelper.token();
	}

	public ResponseModal(int code, boolean success, String message) {
		super(code, success, message);
		this.token=JwtHelper.token();
	}

	public ResponseModal(int code, boolean success, String message, Object obj) {
		super(code, success, message);
		this.data = obj;
		this.token=JwtHelper.token();
	}

	public ResponseModal(int code, boolean success, String message, Object obj, long total) {
		super(code, success, message);
		this.data = obj;
		this.total = total;
		this.token=JwtHelper.token();
	}

	public ResponseModal(int code, boolean success, String message, String formularyType, Object obj) {
		super(code, success, message);
		this.data = obj;
		this.token=JwtHelper.token();
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public long getTotal() {
		return total;
	}

	public void setTotal(long total) {
		this.total = total;
	}

}